package io.gitee.yth.design.pattern.test.core.pattern.behavioral.clainofresponsibility;

/**
 * @author yth
 * @since 2023-05-03-16:20
 */
public class Dialog extends Widget {

    protected Dialog(HelpHandler handler, Topic topic) {
        super(null);
        setHandler(handler, topic);
    }

    @Override
    public void handleHelp() {
        if (hasHelp()) {
            // offer help on the button
            System.out.println("the dialog offering help ...");
        } else {
            super.handleHelp();
        }
    }
}
